package com.audaque.springboot.foshanupload.web.webdemo.controller;

import com.audaque.springboot.foshanupload.web.webdemo.model.domain.Person;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 Web组件之间的跳转:web组件(Servlet/JSP/Filter/Listener),将一个完整的功能由多个web组件配置完成
 * */
@WebServlet("/servlet")
public class ServletController extends HttpServlet{
	private static final long serialVersionUID = 4993112101987329614L;


	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		Person person = new Person();
		person.setDescribe("1");
		person.setId("1");
		person.setName("1");
		person.setAge(1);


		PrintWriter out = response.getWriter();
		out.println(person);
	}

}
